//
//  OAPageApproveContentCell.m
//  OA项目
//
//  Created by innofive on 2018/4/13.
//  Copyright © 2018年 inno. All rights reserved.
//

#import "OAPageApproveContentCell.h"

@implementation OAPageApproveContentCell
-(void)onAsInitAddView:(UIView *)view forViewController:(UIViewController *)ViewController forDataSource:(id)dataSource AtIndexPath:(NSIndexPath *)indexPath
{
    
    self.textLabel.text = @"123";
    self.textLabel.textAlignment = NSTextAlignmentCenter;
    self.textLabel.font = kSysFont(kFitW(9));
    
    
    self.imageView.image = IMAGE(@"asd");
    self.imageView.contentMode = UIViewContentModeScaleAspectFit;
    self.imageView.masksToBounds = YES;
    
    WSELF(weakSelf);
    [self onMainSetSubViewFrame:^(UIView *view, CGPoint origin, CGSize size, CGPoint center) {
    
        [weakSelf.textLabel sizeToFit];
        weakSelf.textLabel.centerX = size.width/2;
        weakSelf.textLabel.bottom = size.height;
        
        weakSelf.imageView.size = CGSizeMake(size.width, size.height-weakSelf.textLabel.height);
        weakSelf.imageView.centerX = size.width/2;
        weakSelf.imageView.top = 0;
    }];
}
-(void)update:(OAApproveContentModel *)model forCollectionView:(UICollectionView *)CollectionView AtIndexPath:(NSIndexPath *)indexPath
{
    self.textLabel.text = model.cateName;
    
    //self.imageView.image = IMAGE(@"asd");
    
}

@end
